QT       += core gui multimedia multimediawidgets widgets

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

CONFIG += c++11 no_batch console
# The following define makes your compiler emit warnings if you use
# any Qt feature that has been marked deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS WEBRTC_WIN NOMINMAX

# You can also make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0

SOURCES += main.cpp \
    AppCrash.cpp \
    RateCount.cpp \
    SDL_test_font.c \
    clickedlabel.cpp \
    config.cpp \
    limathread.cpp \
    mainwindow.cpp \
    playerwidget.cpp \
    ring_buffer_s.cpp \
    test_devicesbox.cpp \
    test_interfacesbox.cpp \
    test_platformsbox.cpp \
    test_tracksbox.cpp

HEADERS +=\
    AppCrash.h \
    GlobalHeader.h \
    GlobalMacroDef.h \
    RateCount.h \
    clickedlabel.h \
    config.h \
    lima/include/export.hpp \
    lima/include/localcapture.hpp \
    limathread.h \
    mainwindow.h \
    playerwidget.h \
    ring_buffer_s.h \
    spin_mutex.h \
    test_devicesbox.h \
    test_interfacesbox.h \
    test_platformsbox.h \
    test_tracksbox.h



CONFIG(debug, debug|release) {
#    QMAKE_CXXFLAGS_DEBUG += /MTd
#    DEFINES += _ITERATOR_DEBUG_LEVEL=2
    QMAKE_CXXFLAGS_RELEASE += /MT /NODEFAULTLIB:LIBCMT.lib /LIBPATH:C:\\Program Files (x86)\Microsoft Visual Studio\\2017\Enterprise\\VC\\Tools\\MSVC\\14.16.27023\\lib\\x64\\

    QMAKE_LFLAGS_RELEASE+=/MAP
    QMAKE_CFLAGS_RELEASE += /Zi
    QMAKE_LFLAGS_RELEASE +=/debug /opt:ref

    DEFINES += _ITERATOR_DEBUG_LEVEL=0

    win32 {
        INCLUDEPATH  = $$PWD/lima/include
        INCLUDEPATH +=  $$PWD/SDL2-2.0.12/include
        LIBS += $$PWD/lima/lib/debug/lima.dll.lib
        LIBS += -L$$PWD/SDL2-2.0.12//lib//Debug 	-lSDL2 -lSDL2main
        LIBS += -lDbgHelp
    }
    unix {
        INCLUDEPATH  = $$PWD/lima/include
        INCLUDEPATH +=  /root/ThirdParty/GatherLibs/include
        LIBS += $$PWD/lima/lib/debug/liblima.so
        LIBS += -L/root/ThirdParty/GatherLibs/lib 	-lSDL2 -lSDL2main -lx265

    }


}

CONFIG(release, debug|release) {
    QMAKE_LFLAGS_RELEASE = /INCREMENTAL:NO /DEBUG
    QMAKE_CXXFLAGS_RELEASE += /MT  /NODEFAULTLIB:LIBCMT.lib

    QMAKE_LFLAGS_RELEASE+=/MAP
    QMAKE_CFLAGS_RELEASE += /Zi
    QMAKE_LFLAGS_RELEASE +=/debug /opt:ref


    DEFINES += _ITERATOR_DEBUG_LEVEL=0

    win32 {
        INCLUDEPATH  = $$PWD/lima/include
        INCLUDEPATH +=  $$PWD/SDL2-2.0.12/include
        LIBS += $$PWD/lima/lib/release/lima.dll.lib
        LIBS += -L$$PWD/SDL2-2.0.12//lib//Release 	-lSDL2 -lSDL2main
        LIBS += -lDbgHelp
    }
    unix {
        INCLUDEPATH  = $$PWD/lima/include
        INCLUDEPATH +=  /root/ThirdParty/GatherLibs/include
        LIBS += $$PWD/lima/lib/release/liblima.so
        LIBS += -L/root/ThirdParty/GatherLibs/lib 	-lSDL2 -lSDL2main -lx265

    }
}

FORMS += \
    mainwindow.ui

TRANSLATIONS += \
    VZanMSWinRTCSdk-Demo_zh_CN.ts

# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target

RESOURCES += \
    res.qrc

DISTFILES += \
    copylibso.bat

